package com.caishi.lkx.exam.api;


import com.caishi.lkx.exam.model.HotSharedModel;
import com.caishi.lkx.exam.service.impl.HotShareServiceImpl;
import com.zzw.common.annotation.ApiResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "热点分享")
@Slf4j
@RestController
@RequestMapping("/exam/hotShare")
public class HotShareApi {
    @Autowired
    private HotShareServiceImpl hotShareService;
    @GetMapping
    @ApiResult
    List<HotSharedModel> getHotShares(){
//没有ResultIgnore注解,不是Result的实例，method需要有ApiResult注解
        List<HotSharedModel> hotShares = hotShareService.getHotShares();
        return hotShares;
    }
}
